﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Liolikas.LiolikasGame;

namespace Liolikas.GameObjects
{
    class Abalys:Character
    {
         public static String STANDART_MODEL=";/";
         Random random = new Random(Game.GetGame().GetSeed());
         public Abalys (int yCoord, int xCoord, int speed):base(yCoord,xCoord){
             base.model = STANDART_MODEL;
             base.positionUpdateInterval = 1000 / speed;
             base.objectBackgroundColor = ConsoleColor.Red;
             base.objectColor = ConsoleColor.White;
         }

        override public void GetNewCoordinates()
        {

            int direction = random.Next(1, 5);

            if (direction==1) hCoord--;
            else if (direction == 2) hCoord++;         
            else if (direction == 3) wCoord--;      
            else if (direction == 4) wCoord++;   
        }
        override public void Collide(GameObject gameObj)
        {
            if (gameObj is PlayerChar)
                ((PlayerChar)gameObj).Collide(this);
        }

  
    }
}
